using System.ComponentModel.DataAnnotations;

namespace AdminSystem.API.DTOs
{
    public class ContentDto
    {
        public int Id { get; set; }
        public string Title { get; set; } = string.Empty;
        public string Body { get; set; } = string.Empty;
        public string ContentType { get; set; } = string.Empty;
        public int AuthorId { get; set; }
        public string AuthorName { get; set; } = string.Empty;
        public bool IsPublished { get; set; }
        public DateTime CreatedAt { get; set; }
        public DateTime? UpdatedAt { get; set; }
        public DateTime? PublishedAt { get; set; }
    }

    public class CreateContentDto
    {
        [Required]
        [StringLength(200)]
        public string Title { get; set; } = string.Empty;

        [Required]
        public string Body { get; set; } = string.Empty;

        [StringLength(50)]
        public string ContentType { get; set; } = "html";

        public bool IsPublished { get; set; } = false;
    }

    public class UpdateContentDto
    {
        [Required]
        [StringLength(200)]
        public string Title { get; set; } = string.Empty;

        [Required]
        public string Body { get; set; } = string.Empty;

        [StringLength(50)]
        public string ContentType { get; set; } = "html";

        public bool IsPublished { get; set; } = false;
    }
}
